package com.canton.service.impl;
import com.canton.dao.entity.AreaNode;
import com.canton.dao.repository.AreaRepository;
import com.canton.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AreaServiceImpl implements AreaService {
    @Autowired
    private AreaRepository areaRepository;


    @Override
    public AreaNode findByName(String name) {
        return areaRepository.findByName(name);
    }

    @Override
    public List<AreaNode> findAll() {
        return areaRepository.findAll();
    }

    @Override
    public List<AreaNode> findByNameLike(String likes) {
        return areaRepository.findByNameLike(likes);
    }
}
